<template>
  <el-container style="padding-top:10px;">
    <el-aside width="200px" v-show="hideNavPanl">
      <nav_list/>
    </el-aside>
    <el-container>
      <note_edit/>
    </el-container>
  </el-container>
</template>

<script>

import nav_list from "@/components/nav-list";
import note_edit from "@/components/note-edit";
import {defineComponent, getCurrentInstance, onMounted, reactive, toRefs} from "vue";

export default defineComponent({
  components: {
    nav_list,
    note_edit
  },
  setup() {
    const { proxy } = getCurrentInstance();

    const state = reactive({
      filterText: '',  //过滤
      hideNavPanl : true,
    })

    onMounted(() => {
      proxy.$bus.on('hidePanl', (e) => {
        state.hideNavPanl = e
        //proxy.$message("hidePanl=" + state.hideNavPanl)
      })
    })

    return {
      ...toRefs(state),

    }
  }
})

</script>

<style scoped>
.el-header { padding: 1px; }
.el-main { margin-top: 0px; padding: 10px; }
.el-aside { border-right: 1px solid #ccc; }
</style>
